package com.cpos.bkge.base;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class BaseEntity implements Serializable {


    //创建人
    private String createMan;
    //创建时间
    @DateTimeFormat
    private Date createTime;
    //更新时间
    @DateTimeFormat
    private Date updateTime;
    //版本号
    private String version;
    //删除标记
    private Integer delFlag;

    @Override
    public String toString() {
        return "BaseEntity{" +
                "createMan='" + createMan + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", version='" + version + '\'' +
                ", delFlag=" + delFlag +
                '}';
    }



    public String getCreateMan() {
        return createMan;
    }

    public void setCreateMan(String createMan) {
        this.createMan = createMan;
    }

    public Date getCreateTime() {
        return createTime;
    }

    @DateTimeFormat
    public void setCreateTime(Date createTime) {
        this.createTime = new Date();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    @DateTimeFormat
    public void setUpdateTime(Date updateTime) {

        this.updateTime =  new Date();
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}
